<template>
  <div id="app">
<!--    <img alt="Vue logo" src="./assets/logo.png">-->
<!--    <HelloWorld msg='OK'/>-->
  <router-view />
<!--引入底部导航组件 利用路由里面设置的meta参数来控制其显示-->
<!--  <Tabbar v-if="$route.meta.TabbarShow"></Tabbar>-->

  </div>
</template>

<script>
// import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  components: {
    // HelloWorld

  },
  data(){
    return{
      show:true     // 控制Footer组件的显隐状态
    }
  },
  //使用watch监听导航切换来控制是否显示导航栏
  watch:{
    $route(to){
      if (to.name === 'cart') {
                   this.show = false
               }
    }
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
  padding-bottom: 50px;
}
* {
        margin: 0;
        padding: 0;
    }
body {
  font-size: 16px;
  background-color: #f8f8f8;
  -webkit-font-smoothing: antialiased;
}
</style>
